html {
  overflow: hidden;
}

body {
  margin: 0; 
  padding: 0; 
  overflow: hidden; 
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid #DDD;
  border-radius: 5px;
}

.hidden {
  display: none;
}

.visible-hidden {
  visibility: hidden;
}

@-webkit-keyframes fadeIn {
  0% {
      opacity: 0;
  }

  100% {
      opacity: 1;
  }
}

.header {
  position: relative; 
  height: 40px; 
  background-color: #FFF; 
  -webkit-app-region: drag; 
  padding-right: 100px; 
  z-index: 10;
}

.mac-os .windows {
  display: none !important;
}

.windows-os .mac {
  display: none !important;
}

.page-operations {
  display: inline-block;
  height: 40px; 
  line-height: 40px;
  -webkit-app-region: no-drag;
  position: absolute; 
  right: 0; 
  z-index: 100;

  &.windows {
    position: absolute; 
    top: 0;
    right: 0; 
    display: flex; 
    align-items: center;

    i {
      font-size: 10px;
      padding: 0 10px; 
      cursor: pointer;

      &:hover {
        background-color: #DDD; 
        color: #FFF; 
        font-weight: bolder;
      }
    }

    .btn-minimize {
      font-size: 14px; 

      &:before {
        content: '\e633';
      }
    }

    .btn-maximize {
      &:before {
        content: '\e630';
      }
    }

    .btn-close {
      &:before {
        content: '\e618';
      }
    }

  }

  &.mac {
    position: fixed; 
    left: 5px; 
    top: 8px;
    width: 100px;
    
    i {
      float: left; 
      box-sizing: border-box; 
      width: 24px;
      height: 24px; 
      line-height: 24px; 
      border-radius: 50%; 
      margin-right: -4px; 
      border: 1px solid #FFF; 
      transform: scale(.5);
      -webkit-app-region: no-drag;

      &:before {
        font-size: 16px; 
        color: #222; 
        opacity: .85; 
        width: 100%; 
        height: 100%; 
        visibility: hidden;
        position: absolute;
      }

      &:hover i:before {
        visibility: visible;
      }

    }

    .btn-close {
      background-color: #fc625d;
      border-color: #df4744;

      &:before {
        content: '\e618';
        position: relative; 
        top: -2px; 
        left: 5px; 
        font-size: 12px; 
      }
    }

    .btn-minimize {
      background-color: #fdbc40;
      border-color: #dd9e33;

      &:before {
        content: '\e633';
        position: relative;
        left: 1px;
        font-size: 20px; 
      }
    }

    .btn-maximize {
      background-color: #35cc4b;
      border-color: #26a934;

      &:before {
        content: '\e630';
        position: relative; 
        top: -4px; 
        left: 3px;
        font-size: 12px; 
      }
    }

  }
}

.img-container {
  width: 100%; 
  height: 100%; 
  position: relative;

  .img-preview {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    max-width: 90%; 
    max-height: 90%; 
    border-radius: 5px;

    &.scroll {
      max-width: initial; 
      max-height: initial;
      cursor: move;
    }
  }

  .watermark-layer {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none;
  }

  .tip-box {
    position: absolute; 
    top: 10px; 
    left: 50%; 
    transform: translateX(-50%);
    padding: 10px; 
    box-sizing: border-box; 
    border-radius: 5px; 
    background-color: #474747; 
    color: #FFF; 

    &.visible-hidden {
      animation: fadeIn 3s;
    }
  }

  .toastr {
    display: inline-block; 
    position: absolute; 
    top: 20px; 
    left: 50%; 
    transform: translateX(-50%);
    border-radius: 5px; 
    padding: 10px 20px;
    min-width: 100px; 
    max-width: 200px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
    background-color: #474747;  
    color: #FFF; 

    &.success {
      background-color: #dff0d8;
      border-color: #d6e9c6;
      color: #3c763d;
    }
    
    &.error {
      background-color: #f2dede;
      border-color: #ebccd1;
      color: #a94442;
    }
    
    &.warning {
      color: #8a6d3b;
      background-color: #fcf8e3;
      border-color: #faebcc; 
    }
  }
}

.prev-wrapper {
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 5rem;
  height: 100%; 
}

.next-wrapper {
  position: absolute; 
  top: 0;
  right: 0; 
  width: 5rem;
  height: 100%; 
}

.icon-prev, 
.icon-next {
  font-size: 1.5rem; 
  position: absolute;
  top: 35%; 
  padding: 1rem;  
  cursor: pointer;
  width: 20px; 
  height: 20px; 
  border-radius: 50%; 
  background-color: rgba(37, 55, 71, 0.8); 
  font-weight: bold; 
  color: #FFF;
}

.icon-prev {
  left: 1rem; 

  &:before {
    content: '\e637'; 
    position: relative; 
    right: .2rem;
  }
}

.icon-next {
  right: 1rem; 
  transform: rotate(180deg);

  &:before {
    content: '\e637';
    position: relative; 
    right: .2rem;
  }
}




.footer {
  width: 100%;
  position: absolute;
  bottom: 30px;
  text-align: center;
}

.img-operations { 
  display: inline-block; 
  background-color: rgba(37, 55, 71, 0.85);
  padding: 10px; 
  border-radius: 20px;
  color: #FFF;

  i {
    padding: 10px; 
    cursor: pointer; 
  }

  .icon-zoom-in {
    &:before {
      content: '\e629';
    }
  }

  .icon-zoom-out {
    position: relative; 
    font-size: 22px; 
    top: 2px;

    &:before {
      content: '\e633';
    }
  }

  .icon-rotate {
    &:before {
      content: '\e62d';
    }
  }

  .icon-download {
    &:before {
      content: '\e62c';
    }
  }

  .icon-collect {
    &:before {
      content: '\e62a';
    }

    &.in-collection {
      color: #fdbc40;
    }
  }

}

.img-loading {
  width: 24px;
  position: absolute; 
  margin: auto; 
  top: 0; 
  right: 0; 
  bottom: 0; 
  left: 0;

  &:before {
    content: '\e'
  }
}